<template>
    <div class="top">
      <div style="width:20px;height:20px;margin-top:8px;margin-left:8px;">
        <img style="width:20px;" src="@/assets/images/download.png" @click="go_url()" />
      </div>
      <span class="title">{{title}}</span>
    </div>
</template>
<script>
    import { useRouter } from "vue-router";
    export default {
        name : "Header",
        props: ["title"],
        setup() {
          const router = useRouter();
          const go_url=()=>{
            router.go(-1);
            setTimeout(() => {
              router.go()
            }, 500);
          }
          return {
            go_url
          }
        }
    };
</script>
<style scoped>
.top {
  height: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.1rem;
  border-bottom: 1px solid #dedede;
}

.top > a:first-of-type {
  font-size: 0.2rem;
}

.top .title {
  place-self: center;
  font-size: larger;
}

.top .right {
  place-self: end;
}

.top .right a {
  font-size: 0.2rem;
}
</style>